import { Orignizers } from '@/pages/System/Institution/index.d';
import request from '@/utils/request';
import { FAIR_LIST } from './list';

/**
 * 添加印机构管理信息
 * @param data
 */
export function insertPressOrganization(data: any): Promise<any> {
  return request('/sealCuttingApi/pressOrganization/insertPressOrganization', {
    method: 'POST',
    data,
  });
}

/**
 * 修改印机构管理信息
 * @param data
 */
export function updatePressOrganization(data: Orignizers): Promise<any> {
  return request('/sealCuttingApi/pressOrganization/updatePressOrganization', {
    method: 'POST',
    data,
  });
}

/**
 * 禁用或启用印机构接口
 * @param data
 */
export function disableOrEnablePress(params: any): Promise<any> {
  return request('/sealCuttingApi/pressOrganization/disableOrEnablePress', {
    method: 'POST',
    params,
  });
}

/**
 * 查询作品任务所关联的所有展览接口
 * @param data
 */
export function queryAllExhibition(): Promise<any> {
  return request('/sealCuttingApi/creativeTask/queryAllExhibition');
}

/**
 * 获取展览名称
 */
export function queryExhibitionParamlist(): Promise<any> {
  return request(FAIR_LIST);
}

/**
 * 获取单位集合
 */
export function queryCompanyList(): Promise<any> {
  return request('/sealCuttingApi/entryInfo/queryCompanyList', {
    method: 'POST',
  });
}

/**
 * 获取展览下拉列表默认选中的展览
 */
export function queryDefaultSelectedExhibition(): Promise<any> {
  return request('/sealCuttingApi/exhibition/queryDefaultSelectedExhibition');
}
